﻿using System.Windows.Forms;

namespace PMIS.UI
{
	public partial class WelcomeForm : BaseDockForm
	{
		#region 单例
		/// <summary>
		/// 本窗体的实例
		/// </summary>
		private static WelcomeForm _form = null;
		/// <summary>
		/// 用于本窗体实现单例的Locker
		/// </summary>
		private static object locker = new object();
		/// <summary>
		/// 构造函数
		/// </summary>
		private WelcomeForm()
		{
			InitializeComponent();
		}
		/// <summary>
		/// 获取本窗体的实例
		/// </summary>
		/// <returns></returns>
		public static WelcomeForm GetInstance()
		{
			if (_form == null || _form.IsDisposed)
			{
				lock (locker)
				{
					if (_form == null || _form.IsDisposed)
						_form = new WelcomeForm();
				}
			}

			return _form;
		}
		#endregion
	}
}
